-module(embedded_pattern).

-include_lib("ect/include/ect.hrl").

-import_class(pattern1).
-import_class(pattern2).
-import_class(pattern3).

-export([dotest/0]).


dotest() ->
    X1 = #pattern3{c = ["as", "s"]},
    Z = list_to_atom(process({a, b, [c, "p", X1, q]})).

process({_, _, [_, A, #pattern2{c = [B, C]}, _]}) ->
    A++B++C.